<template>
  <div class="main">
    <!--    :list-query="listQuery"-->
    <data-table
      ref="pagingTable"
      :options="options"
      :list-query="listQuery"
    >
      <template slot="data-columns">

        <el-table-column
          label="收藏题目"
          prop="quTitle"
          align="center"
          show-overflow-tooltip>
          <template slot-scope="scope">
            <router-link :to="{ name: 'ViewQu', params:{ id: scope.row.quId }}">
              {{ scope.row.quTitle }}
            </router-link>
          </template>
        </el-table-column>

        <el-table-column
          label="收藏时间"
          prop="createTime"
          align="center"
        />
      </template>
    </data-table>
  </div>
</template>
<script>
import DataTable from '@/components/DataTable'

export default {
  name: 'noteList',
  data() {
    return {
      listQuery: {
        current: 1,
        size: 10,
        params: {
          id: "",
          quId: "",
        }
      },

      options: {
        // 可批量操作
        multi: true,
        // 批量操作列表
        multiActions: [
          {
            value: 'delete',
            label: '取消收藏'
          }
        ],
        listUrl: '/collect/paging',
        deleteUrl: '/collect/delete',
      },
    }
  },
  components: {
    DataTable
  },
  methods: {
    showDialog () {
      this.$confirm('是否取消收藏本题目？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$message({
          type: 'success',
          message: '删除成功!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
